package com.jh.Test;

import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.jh.dao.impl.UserServiceImpl;
import com.jh.service.impl.KingServiceImpl;

public class MyTest {

	public void test01() {
		BeanFactory factory = new ClassPathXmlApplicationContext("spring-config.xml");
		KingServiceImpl ks = factory.getBean("KingServiceImpl", KingServiceImpl.class);

		ks.queryall();
	}

	@Test
	public void test02() {
		BeanFactory factory = new ClassPathXmlApplicationContext("annotation.xml");
		UserServiceImpl bean = factory.getBean("userServiceImpl", UserServiceImpl.class);
		
		bean.test01();
	}
}
